// 预排柜管理接口
import request from '@/utils/request'

// 订单列表
export function getlistTable(params) {
  return request({
    url: 'order/cabinet/listTable',
    params,
  })
}

// 新增
export function addCab(data) {
  return request({
    url: 'order/cabinet',
    method: 'post',
    data,
  })
}
// 删除
export function delCab(id) {
  return request({
    url: `order/cabinet/${ id }`,
    method: 'delete',
		
  })
}
// 查存制单的订单数据
export function getOrderNoInfo(params) {
  return request({
    url: 'order/cabinet/selectOrderNoInfo',
    params,
  })
}
// 根据订单号返回规格 
export function selectOrderPackage(params) {
  return request({
    url: 'order/order/info/containerDetail',
    params,
  })
}

export function selectOrderPackage2(params) {
  return request({
    url: 'order/cabinet/selectOrderPackage',
    params,
  })
}
// 查柜所有订单信息
export function queryCatbinOrderInfo(params) {
  return request({
    url: 'order/cabinet/queryCatbinOrderInfo',
    params,
  })
}
// 查柜所有订单信息
export function queryOrderPackageInfo(data) {
  return request({
    url: 'order/cabinet/queryOrderPackageInfo',
    data,
    method: 'post',
  })
}
// 虚拟柜添加整票订单
export function addCatbinOrderNo(data) {
  return request({
    url: 'order/cabinet/addCatbinOrderNo',
    data,
    method: 'post',
  })
}
export function addCatbinOrderPackage(data) {
  return request({
    url: 'order/cabinet/addCatbinOrderPackage',
    data,
    method: 'post',
  })
}

export function removeCatbinOrderNo(data) {
  return request({
    url: 'order/cabinet/removeCatbinOrderNo',
    data,
    method: 'put',
  })
}

export function removeCatbinOrderPackage(data) {
  return request({
    url: 'order/cabinet/removeCatbinOrderPackage',
    data,
    method: 'put',
  })
}
// 确定装柜

export function confirmCabinet(data) {
  return request({
    url: 'order/deliveryMerge/confirmCabinet',
    data,
    method: 'post',
  })
}
// 新增转运

export function addtransfer(data) {
  return request({
    url: 'order/transfer',
    data,
    method: 'post',
  })
}
// 装柜修改

export function queryLoadingPackageDetails(data) {
  return request({
    url: 'order/deliveryMerge/queryLoadingPackageDetails',
    data,
    method: 'post',
  })
}

export function queryMergeLoadingOrderInfo(params) {
  return request({
    url: 'order/deliveryMerge/queryMergeLoadingOrderInfo',
    params,
   
  })
}
export function selectMergeLoadingOrderNoInfo(params) {
  return request({
    url: 'order/deliveryMerge/selectMergeLoadingOrderNoInfo',
    params,
   
  })
}
export function selectMergeLoadingOrderPackage(params) {
  return request({
    url: 'order/deliveryMerge/selectMergeLoadingOrderPackage',
    params,
   
  })
}
